export default function Fetch(url: string, method: 'GET' | 'POST' = 'GET'): any {
  return new Promise((resolve, inject) => {
    wx.request({
      url,
      header: { 'content-type': 'application/json' },
      method,
      responseType: 'text',
      success: resolve,
      fail: inject,
    })
  })
}